#pragma once

#include "mccommonapi.h"

namespace MCCommon
{

class MCAPI MCStatus
{
public:
    
    /**
     * Default constructor.
     * 
     */
    MCStatus();

    /**
     * Constructor.
     * 
     */
    MCStatus
    ( 
        long errcode, 
        bool isWarning = false 
    );

    /**
     * Destructor.
     * 
     */
    ~MCStatus();

    /**
     * Get the error status.
     * 
     */
    bool IsOK() const;
    bool IsError() const;
    bool IsWarning() const;

    /**
     * Get error code.
     * 
     */
    long GetErrorCode() const;

private:
    
    // Error type.
    enum ErrorType
    {
        kET_OK,
        kET_Error,
        KET_Warning
    }; 
   
private:
    
    // Error type.
    ErrorType fErrType;

    // Error code.
    long fErrCode;
};

} // end of namespace MCCommon.
